package com.test.www;

import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.junit.Test;
import org.omg.Messaging.SyncScopeHelper;

import com.mybatis.dao.OrdersDao;
import com.sessionFactory.util.SqlSessionFactoryUtil;
import com.song.pojo.Tuser;






public class CeShiDao {
	@Test
	public void ce(){
			
		SqlSession se = SqlSessionFactoryUtil.getSqsession();
		
		OrdersDao mapper = se.getMapper(OrdersDao.class);
		/*List<Tuser> list = mapper.ManyToMany();
		for (Tuser tuser : list) {
			System.out.println(tuser);
		}*/
		List<Tuser> selectone = mapper.selectone();
		List<Tuser> one = selectone;
		for (Tuser tuser : one) {
			System.out.println(tuser);
		}
		System.out.println("第一次执行完！");
		//se.commit();
		System.out.println("第二次开始：》》》》》》》》》》《》》》");
		
		//SqlSession se1 = SqlSessionFactoryUtil.getSqsession();
		//OrdersDao mapper1 = se.getMapper(OrdersDao.class);
		List<Tuser> selectwo = mapper.selectone();
		for (Tuser tuser : selectwo) {
			System.out.println(tuser);
		}
	}
}
